/*
 * $Id: DataException.java 27 2007-04-13 01:02:48Z aaron.day $
 */
package org.crazydays.core;


import org.crazydays.core.data.PolisData;

/**
 * DataException
 */
public class DataException
	extends Exception
{
	/** serial version uid */
	public final static long serialVersionUID = "$Id: DataException.java 27 2007-04-13 01:02:48Z aaron.day $".hashCode();

	/** polis data */
	protected PolisData data;

	/**
	 * DataException default constructor.
	 */
	public DataException()
	{
		super();
	}

	/**
	 * DataException message constructor.
	 * 
	 * @param message Message
	 */
	public DataException(String message)
	{
		super(message);
	}

	/**
	 * DataException cause constructor.
	 * 
	 * @param cause Cause
	 */
	public DataException(Throwable cause)
	{
		super(cause);
	}

	/**
	 * DataException message and cause constructor.
	 * 
	 * @param message Message
	 * @param cause Cause
	 */
	public DataException(String message, Throwable cause)
	{
		super(message, cause);
	}

	/**
	 * DataException data constructor.
	 * 
	 * @param data Data
	 */
	public DataException(PolisData data)
	{
		setData(data);
	}

	/**
	 * DataException message and data constructor.
	 * 
	 * @param message Message
	 * @param data Data
	 */
	public DataException(String message, PolisData data)
	{
		super(message);
		setData(data);
	}

	/**
	 * DataException cause and data constructor.
	 * 
	 * @param cause Cause
	 * @param data Data
	 */
	public DataException(Throwable cause, PolisData data)
	{
		super(cause);
		setData(data);
	}

	/**
	 * DataException message, cause, and data constructor.
	 * 
	 * @param message Message
	 * @param cause Cause
	 * @param data Data
	 */
	public DataException(String message, Throwable cause, PolisData data)
	{
		super(message, cause);
		setData(data);
	}

	/**
	 * Set data.
	 * 
	 * @param data Data
	 */
	public void setData(PolisData data)
	{
		this.data = data;
	}

	/**
	 * Get data.
	 * 
	 * @return Data
	 */
	public PolisData getData()
	{
		return data;
	}
}
